<?php
/**
 * Created by PhpStorm.
 * User: 快定
 * Date: 2022/1/5
 * Time: 15:34
 */
use Pheanstalk\Pheanstalk;
require "vendor/autoload.php";

$pea = Pheanstalk::create('10.0.0.200',11300,20);
$sql = [
    'sql' => 'INSERT INTO `wyq`.`jobtest`(`init_time`, `last_time`) VALUES (? , ?);',
    'data' => [time(),date("Y-m-d H:i:s")],
];
$data = json_encode($sql);
$job = $pea->watchOnly('sql')->put($data);
var_dump($job);
echo "成功";